<template>
  <n-config-provider :theme-overrides="themeOverrides">
    <n-message-provider>
      <router-view />
    </n-message-provider>
  </n-config-provider>
</template>
<script setup>
import { NConfigProvider } from "naive-ui";
import { useUser } from "@/stores/user";
import { useCompare } from "@/stores/compare";
import { useI18n } from "vue-i18n";
const { t } = useI18n();
window.tt = t;
const themeOverrides = {
  common: {
    primaryColor: "#F45804",
  },
  Button: {
    // textColor: "#FF0000",
    colorPrimary: "var(--main-color)",
    colorHoverPrimary: "var(--main-color)",
    colorPressedPrimary: "var(--main-color)",
    colorFocusPrimary: "var(--main-color)",
    borderPrimary: "var(--main-color)",
    borderHoverPrimary: "var(--main-color)",
    borderPressedPrimary: "var(--main-color)",
    borderFocusPrimary: "var(--main-color)",
    textColorGhostHoverPrimary: "var(--main-color)",
    textColorGhostPressed: "var(--main-color)",
    textColorTextPressed: "var(--main-color)",
    textColorPressed: "var(--main-color)",
    textColorGhostPressedPrimary: "var(--main-color)",
    borderRadiusTiny: "4px",
    borderRadiusSmall: "4px",
    borderRadiusMedium: "8px",
    borderRadiusLarge: "10px",
    borderPrimary: "1px solid var(--main-color)",
  },
  Spin: {
    color: "var(--main-color)",
    textColor: "var(--main-color)",
  },
  Badge: {
    color: "var(--main-color)",
    fontSize: "14px",
  },
  BackTop: {
    iconColorHover: "var(--main-color)",
    iconColorPressed: "var(--main-color)",
  },
  Input: {
    borderHover: "1px solid var(--main-color)",
    borderFocus: "1px solid var(--main-color)",
  },
  Breadcrumb: {
    itemTextColorHover: "var(--main-color)",
  },
  // Select: {
  //   peers: {
  //     InternalSelection: {
  //       textColor: "#FF0000",
  //     },
  //   },
  // },
};
const { getCurrencyRateHandle } = useUser();
getCurrencyRateHandle();

const { loadCompareGoods } = useCompare();
loadCompareGoods();
</script>
